/* eslint-disable no-unused-vars */
<template>
	<div id="demo">
		博文标题： {{title}}
		<div v-html="html"></div>
	</div>
</template>

<script>
import Vue from 'vue'
export default {
	name: "demo",

	data() {
		return {
			title: "Hello Word-0000",
			// html: '<div id="app2"><el-button @click="nClick">默认按钮</el-button><table><tbody><tr class="firstRow"><td width="291" valign="top" style="word-break: break-all;">姓名</td><td width="291" valign="top"><input @click="nClick" v-model="val" type="text" value="" id="TB_XingMing" name="TB_XingMing" data-key="XingMing" data-name="姓名" data-type="Text" class="form-control" leipiplugins="text" style="width: 240px;"/></td><td width="291" valign="top" style="word-break: break-all;">年龄</td><td width="291" valign="top"><input type="text" value="" id="TB_Age" name="TB_Age" data-key="Age" data-name="年龄" data-type="Int" class="form-control" leipiplugins="text" style="width: 240px;"/></td></tr></tbody></table><div>'
			html: '<p id="app2">333333-000<input id="val"/> <p>'
		};
	},

	beforeCreate() {},

	created() {
		this.$nextTick(() => {
			
			//再建立一个vue实例，和内部的p对应
			var app2 = new Vue({
				el: "#app2",
				data: {
					message: "内部 Hello Word",
					val:'',
					mm:'click'
				},
				methods: {
					//内部的单击事件，这样就可以对应上了，测试通过。
					nClick() {
						alert(this.val);
					}
                }
            });
			console.log(app2)
			// this.$('#val').on("click", function () {
			// 	alert("dd");
			// })
			// this.$('#val').attr("onclick","fucntion(){alert('cc');};");
        });
        
	},

	methods: {},

	//监听
	computed: {},

	components: {},

	//监听后执行动作
	watch: {}
};
</script>

<style lang="less" scoped>
</style>